﻿using AutoMapper;
using B.S.BasicData.Api.Write.Application.Command.Account;
using B.S.BasicData.Api.Write.Application.Command.GridPerson;
using B.S.BasicData.Api.Write.Application.Command.GridType;
using B.S.BasicData.Domain.Entities;

namespace B.S.BasicData.Api.Write
{
    /// <summary>
    /// automapper的配置
    /// </summary>
    public class AutoMaperProfile:Profile
    {
        public AutoMaperProfile()
        {
            CreateMap<CreateAccountCommand,AccountModel>().ReverseMap();//管理员的请求命令类-->AccountModel
            CreateMap<CreateGridPersonCommand, AccountModel>().ReverseMap();//网格人员的请求命令类-->AccountModel
            CreateMap<UpdateGridPersonCommand, AccountModel>().ReverseMap();//网格人员的请求命令类-->AccountModel
            CreateMap<GridTypeModel, CreateGridtypeCommand>().ReverseMap();// 把请求命令对象转成网格类型实体 
            CreateMap<GridTypeModel, UpdateGridtypeCommand>().ReverseMap();// 把请求命令对象转成网格类型实体 //   
        }
    }
}
